﻿using System;
using System.Collections.Generic;
using System.Text;
using GGSharp.Http;

namespace GGSharp.Radio
{
    public abstract class RDSResponseBase : HttpStructureBase
    {
        private string _rdsText;
        private RequestInfo _request;
        private ResponseType _type;

        public string RDSText
        {
            get { return _rdsText; }
            set
            {
                _rdsText = value;
                OnPropertyChanged("RDSText");
            }
        }

        public RequestInfo Request
        {
            get { return _request; }
            protected set { _request = value; }
        }

        public ResponseType Type
        {
            get { return _type; }
            protected set { _type = value; }
        }

        public abstract void Read(string response);

        public override void Read(System.IO.StreamReader reader)
        {
            Read(reader.ReadToEnd());
        }
    }
}
